<%-- 
    Document   : quanlythanhvien
    Created on : Jan 6, 2012, 12:55:47 AM
    Author     : HoangLiem
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<link href="style/manage.css" rel="stylesheet" type="text/css"/>

<div id="acs_body_main_search" class="title"><!--khung search-->
    <span style="text-align:center;width:50%;float:right;margin-top:10px; margin-bottom: 5px;">
        <form name='frmSearch' action='quanLyThanhVien?action=search' method='POST'>
            <input type="text" size="25" name="tuKhoa" id="tuKhoa" />              
            <input type="submit" name="btSearch" id="btSearch" value=" Search " size="10"/>
        </form>
    </span>
</div>
<div class="title">THÀNH VIÊN VI PHẠM</div>
<div class="item" style="background-color:#EEE;">
    <div class="item_1"><b>Username</b></div>
    <div class="item_2"><b>Description</b></div>
    <div class="item_3"><b>Ngày hết hạn</b></div>
    <div class="item_4"><b>Ban</b></div>
    <div class="item_5"><b>Unban</b></div>
</div>
<c:forEach var="tvvp" items="${dstvvp}" varStatus="dstvvp" begin="0" end="${dstvvp.size()}" step="1">
    <div class="item">
        <form id="banform" name="banform" action="adminControllerMember?action=ban&username=${tvvp.thanhvien.tenDangNhap}" method="POST">
            <div class="item_1">${tvvp.thanhvien.tenDangNhap}</div>
            <div class="item_2"><textarea id="txtLydo_${tvvp.thanhvien.tenDangNhap}" name="txtLydo_${tvvp.thanhvien.tenDangNhap}" cols="13" rows="3" wrap="soft">${tvvp.lyDo}</textarea></div>
            <div class="item_3">
                <div class="ngaySinhItem">
                    <p>Tháng:</p>
                    <p>
                        <select name="cbThang_${tvvp.thanhvien.tenDangNhap}" id="cbThang_${tvvp.thanhvien.tenDangNhap}" style="width: 80px;">
                            <c:forEach var="i" begin="1" end="12" step="1">
                                <option value="${i}" 
                                        <c:choose>
                                            <c:when test="${i == tvvp.ngayHetHan.getMonth() + 1}">
                                                selected='selected'
                                            </c:when>
                                        </c:choose>
                                        >Tháng ${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
                <div class="ngaySinhItem">
                    <p>Ngày:</p>
                    <p>
                        <select name="cbNgay_${tvvp.thanhvien.tenDangNhap}" id="cbNgay_${tvvp.thanhvien.tenDangNhap}" style="width: 50px;">
                            <c:forEach var="i" begin="1" end="31" step="1">
                                <option value="${i}" 
                                        <c:choose>
                                            <c:when test="${i == tvvp.ngayHetHan.getDate()}">
                                                selected='selected'
                                            </c:when>
                                        </c:choose>
                                        >${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
                <div class="ngaySinhItem">
                    <p>Năm:</p>
                    <p>
                        <select name="cbNam_${tvvp.thanhvien.tenDangNhap}" id="cbNam_${tvvp.thanhvien.tenDangNhap}" style="width: 80px;">
                            <c:forEach var="i" begin="2012" end="2022" step="1">
                                <option value="${i}" 
                                        <c:choose>
                                            <c:when test="${i == tvvp.ngayHetHan.getYear() + 1900}">
                                                selected='selected'
                                            </c:when>
                                        </c:choose>
                                        >${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
            </div>
            <div class="item_4"><input type="submit" name="ban" id="ban" value="ban" /></div>
            <div class="item_5"><input type="submit" name="unban" id="unban" value="unban" onclick="xulysubmit('banform', 'adminControllerMember?action=unban&username=${tvvp.thanhvien.tenDangNhap}');" /></div>
        </form>
    </div>
</c:forEach>

<div class="title">THÀNH VIÊN BÌNH THƯỜNG</div>
<div class="item" style="background-color:#EEE;">
    <div class="item_1"><b>Username</b></div>
    <div class="item_2"><b>Description</b></div>
    <div class="item_3"><b>Ngày hết hạn</b></div>
    <div class="item_4"><b>Ban</b></div>
</div>
<c:forEach var="tv" items="${dstvkovp}" varStatus="dstvkovp" begin="0" end="${dstvkovp.size()}" step="1">
    <div class="item">
        <form id="banform" name="banform" action="adminControllerMember?action=ban&username=${tv.tenDangNhap}" method="POST">
            <div class="item_1">${tv.tenDangNhap}</div>
            <div class="item_2"><textarea id="txtLydo_${tv.tenDangNhap}" name="txtLydo_${tv.tenDangNhap}" cols="13" rows="3" wrap="soft"></textarea></div>
            <div class="item_3">
                <div class="ngaySinhItem">
                    <p>Tháng:</p>
                    <p>
                        <select name="cbThang_${tv.tenDangNhap}" id="cbThang_${tv.tenDangNhap}" style="width: 80px;">
                            <c:forEach var="i" begin="1" end="12" step="1">
                                <option value="${i}">Tháng ${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
                <div class="ngaySinhItem">
                    <p>Ngày:</p>
                    <p>
                        <select name="cbNgay_${tv.tenDangNhap}" id="cbNgay_${tv.tenDangNhap}" style="width: 50px;">
                            <c:forEach var="i" begin="1" end="31" step="1">
                                <option value="${i}">${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
                <div class="ngaySinhItem">
                    <p>Năm:</p>
                    <p>
                        <select name="cbNam_${tv.tenDangNhap}" id="cbNam_${tv.tenDangNhap}" style="width: 80px;">
                            <c:forEach var="i" begin="2012" end="2022" step="1">
                                <option value="${i}">${i}</option>
                            </c:forEach>
                        </select>
                    </p>
                </div>
            </div>
            <div class="item_4"><input type="submit" name="ban" id="ban" value="ban" /></div>
        </form>
    </div>
</c:forEach>

